#include <string>
#include <algorithm>
using namespace std;
class Solution {
public:
    string addStrings(string num1, string num2) {
		reverse(num1.begin(), num1.end());
		reverse(num2.begin(), num2.end());
		string ret;
		int t=0;
		int length = min(num1.size(), num2.size());
		for(int i=0;i<length;++i)
		{
			t = t + num1[i] + num2[i]-'0'-'0';
			ret.push_back(t % 10 + '0');
			t /= 10;
		}
		for(int i=length;i<num1.size();++i)
		{
			t = t + num1[i]-'0';
			ret.push_back(t % 10 + '0');
			t /= 10;
		}
		for(int i=length;i<num2.size();++i)
		{
			t = t + num2[i]-'0';
			ret.push_back(t % 10 + '0');
			t /= 10;
		}
		if (t != 0)
			ret.push_back(t + '0');
		reverse(ret.begin(), ret.end());
		return ret;
    }
};
int main()
{
	return 0;
}